package www.wen.com.common.lib.data.entities

import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable

/**
 * 表名
 * tableName = "app_cache"
 */
@Entity(tableName = "app_cache")
class Cache(

        //PrimaryKey 必须要有,且不为空,autoGenerate 主键的值是否由Room自动生成,默认false
        @field:PrimaryKey(autoGenerate = false) var key: String,

        //直接存储二进制对象
        var data: ByteArray,

        //缓存时间
        var cacheTime: Long = System.currentTimeMillis(),

) : Serializable